<%@page import="java.util.List"%>
<%@page import="com.kensure.shike.constant.BusiConstant"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"	pageEncoding="UTF-8"%>

<!DOCTYPE html>
<html>
<jsp:include page="base/header.jsp" flush="true"> 
 <jsp:param value="商品管理" name="pageTitle"/>
</jsp:include>

<!--必要样式-->
<link rel="stylesheet" href="<%=BusiConstant.context%>/common/css/style.css" type="text/css" />
<body>
<jsp:include page="base/nav.jsp" flush="true"></jsp:include>

<div id="content" style="margin-left:20px;font-size:12px;">
	<br>

    <div >
        <div>	
         	<table id="headtable">
         		<thead></thead>
             	<tbody></tbody>
            </table>
        </div>
        <div id="fanye"></div>
    </div>
    
    <br>
</div>

</body>



<script>
	var table = createtable("headtable");
	
	var optfun = function(row){
		var tdinner = ""; 
		tdinner += "<button type='button' class='self-btn' onclick='sku(\""+row.id+"\")'>详情</button>";
		return tdinner;
	}

	
	
	
	table.th = [{w:100,na:"日期",colname:"id"}
	,{w:200,na:"销售数量",colname:"sumbbnum"}
	,{w:400,na:"销售金额",colname:"sumfenrun"}
	,{w:200,na:"操作",callfun:optfun}];
	
	table.thinit();
	
	function sucdo(data){
		var rows = data.resultData.rows;
		if(rows){	
			table.data = rows;
			table.tdinit();		
		}	
	}
	
   function huodonglist(){
	   var data = {};
	   var url = getbaseurl("/order/yingxiaoshuju.do");
	   postdo(url, data, sucdo,null, null);
   }
   huodonglist();
   
   
   function sku(id){
	   var addurl = getbaseurl('/ht/yingxiaoxq')+"?day="+id;
       layer.open({
			type: 2,
			title: '营销详情',
			maxmin: true,
			shadeClose: false, //点击遮罩关闭层
			area : ['80%' , '80%'],
			content: addurl
	   });
   }
     
</script>


</html>